using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._ClassificationandPatternRecognition
{
    /// <summary>
    /// <para>Generate Training Samples From Seed Points</para>
    /// <para>Generates training samples from seed points, such as accuracy assessment points or training sample points. A typical use case is generating training samples from an existing source, such as a thematic raster or a feature class.</para>
    /// <para>从种子点生成训练样本，例如准确性评估点或训练样本点。典型用例是从现有源（例如专题栅格或要素类）生成训练样本。</para>
    /// </summary>    
    [DisplayName("Generate Training Samples From Seed Points")]
    public class GenerateTrainingSamplesFromSeedPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateTrainingSamplesFromSeedPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_class_data">
        /// <para>Input Raster or Feature Class Data</para>
        /// <para>The data source that labels the training samples.</para>
        /// <para>标记训练样本的数据源。</para>
        /// </param>
        /// <param name="_in_seed_points">
        /// <para>Input Seed Points</para>
        /// <para>A point shapefile or feature class to provide the centers of training sample polygons.</para>
        /// <para>用于提供训练样本面中心的点形文件或要素类。</para>
        /// </param>
        /// <param name="_out_training_feature_class">
        /// <para>Output Training Sample Feature Class</para>
        /// <para>The output training sample feature class in the format that can be used in training tools, including shapefiles. The output feature class can be either a polygon feature class or a point feature class.</para>
        /// <para>输出训练示例要素类，其格式可用于训练工具（包括 shapefile）。输出要素类可以是面要素类，也可以是点要素类。</para>
        /// </param>
        public GenerateTrainingSamplesFromSeedPoints(object _in_class_data, object _in_seed_points, object _out_training_feature_class)
        {
            this._in_class_data = _in_class_data;
            this._in_seed_points = _in_seed_points;
            this._out_training_feature_class = _out_training_feature_class;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "Generate Training Samples From Seed Points";

        public override string CallName => "ia.GenerateTrainingSamplesFromSeedPoints";

        public override List<string> AcceptEnvironments => ["extent", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_class_data, _in_seed_points, _out_training_feature_class, _min_sample_area, _max_sample_radius];

        /// <summary>
        /// <para>Input Raster or Feature Class Data</para>
        /// <para>The data source that labels the training samples.</para>
        /// <para>标记训练样本的数据源。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster or Feature Class Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_class_data { get; set; }


        /// <summary>
        /// <para>Input Seed Points</para>
        /// <para>A point shapefile or feature class to provide the centers of training sample polygons.</para>
        /// <para>用于提供训练样本面中心的点形文件或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Seed Points")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_seed_points { get; set; }


        /// <summary>
        /// <para>Output Training Sample Feature Class</para>
        /// <para>The output training sample feature class in the format that can be used in training tools, including shapefiles. The output feature class can be either a polygon feature class or a point feature class.</para>
        /// <para>输出训练示例要素类，其格式可用于训练工具（包括 shapefile）。输出要素类可以是面要素类，也可以是点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Training Sample Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_training_feature_class { get; set; }


        /// <summary>
        /// <para>Min Sample Area</para>
        /// <para>The minimum area needed for each training sample, in square meters. The minimum value must be greater than or equal to 0.</para>
        /// <para>每个训练样本所需的最小面积，以平方米为单位。最小值必须大于或等于 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Min Sample Area")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _min_sample_area { get; set; } = 30;


        /// <summary>
        /// <para>Max Sample Radius</para>
        /// <para>The longest distance (in meters) from any point within the training sample to its center seed point. If set to 0, the output training sample will be points instead of polygons. The minimum value must be greater than or equal to 0.</para>
        /// <para>从训练样本中的任何点到其中心种子点的最远距离（以米为单位）。如果设置为 0，则输出训练样本将是点而不是多边形。最小值必须大于或等于 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Max Sample Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _max_sample_radius { get; set; } = 50;


        public GenerateTrainingSamplesFromSeedPoints SetEnv(object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}